//5:定义一个double类型的数组，长度是8，求数组中所有数的积
public class Task2 {
    public static void main(String[] args) {
        double[] arr = {1, 2, 3, 4, 5, 6, 7, 8};
        double product = 1;
        for (int i = 0; i < arr.length; i++) {
            product *= arr[i];
        }
        System.out.print(product);
    }
}